﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:p="clr-namespace:Lithnet.Acma.Presentation"
                    xmlns:c="clr-namespace:Lithnet.Common.Presentation;assembly=Lithnet.Common.Presentation">

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaExitEventsViewModel}"
                              ItemsSource="{Binding Path=.}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add internal event"
                              Command="{Binding Commands.AddInternalEvent}" />

                    <MenuItem Header="Add external event (command)"
                              Command="{Binding Commands.AddExternalEventCmd}" />

                    <MenuItem Header="Add external event (extension)"
                              Command="{Binding Commands.AddExternalEventExtensible}" />
                    <Separator />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaOperationEventsViewModel}"
                              ItemsSource="{Binding Path=.}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Add pre-operation event"
                              Command="{Binding Commands.AddOperationEvent}" />
                    <Separator />
                    <MenuItem Header="Paste"
                              Command="{Binding Commands.Paste}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>

    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaInternalExitEventViewModel}"
                              ItemsSource="{Binding Path=ChildNodes}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Delete..."
                              Command="{Binding Commands.DeleteEvent}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaExternalExitEventCmdViewModel}"
                              ItemsSource="{Binding Path=ChildNodes}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Delete..."
                              Command="{Binding Commands.DeleteEvent}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaExternalExitEventExtensibleViewModel}"
                              ItemsSource="{Binding Path=ChildNodes}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Delete..."
                              Command="{Binding Commands.DeleteEvent}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>

    <HierarchicalDataTemplate DataType="{x:Type p:AcmaOperationEventViewModel}"
                              ItemsSource="{Binding Path=ChildNodes}">
        <p:TreeViewItemControl>
            <p:TreeViewItemControl.ContextMenu>
                <ContextMenu>
                    <MenuItem Header="Delete..."
                              Command="{Binding Commands.DeleteEvent}" />
                    <Separator />
                    <MenuItem Header="Cut"
                              Command="{Binding Commands.Cut}" />
                    <MenuItem Header="Copy"
                              Command="{Binding Commands.Copy}" />
                </ContextMenu>
            </p:TreeViewItemControl.ContextMenu>
        </p:TreeViewItemControl>
    </HierarchicalDataTemplate>
</ResourceDictionary>